Saltar al contenido principal

Setting Up Webhook Notifications

Requirements

You must have a server that can receive notifications from menta tech. This server must be available on the Internet and must have a valid SSL certificate.

In addition, we require that the server must have an endpoint that can receive requests for HTTP POST.

Configuration

To configure Webhook notifications, you must provide us with the URL of the endpoint that will receive the notifications. To do so, they should contact the menta tech team through the direct contact channel assigned to them.

Example
POST https://yourplatform.com/webhooks/mentatickets
ATENCIÓN

We recommend that the access URL is not enumerable, i.e. it is not possible to access it via a web browser. This is to ensure that the URL cannot be accessed accidentally or maliciously. In addition, to improve security, you can implement an authentication mechanism on the endpoint detailed below.

Once the endpoint has been configured, menta tech will start sending notifications to this endpoint whenever necessary (e.g., if a product is activated to deactivated from the menta Dashboard, if there is a change in the status of a ticket, etc.).

Format of the Notifications

Webhook notifications are sent in JSON format. The following example shows the structure of a notification:

{
"family": "ticket",
"action": "ticket.updated",
"data": {
"id": "00001", // The ID your platform uses to identify the entity.
"newOwnerEmail": "new_owner@email.com"
}
}

All notifications will have at least the structure composed of the following fields: family, action and data.

Field family

Refers to the type of entity being modified. The types of entities that can be modified will be explained later.

Field action

Refers to the type of action performed on the entity. It is composed of the name of the entity and the type of action.

Field data

It contains the relevant information to be updated about the entity. For technical reasons we only send information relevant to the update.

Retry Policy All notifications will be reattempted indefinitely until we receive a successful response code from your server.

Satisfactory response codes:
200 OK, 201 CREATED, 202 ACCEPTED, 204 NO CONTENT

Retries shall be performed with a progressively increasing time interval. This time interval between retries ranges from 5 seconds to 8 minutes. If after 50 retries, the message fails to be delivered, it will stop being reattempted and will enter non-priority sending status.

This non-priority sending will continue retrying to send the message, but with a much longer time interval, from 12hs to 24hs.

Atención

It is important to make sure that messages arrive safely to your server, especially at the testing stage. In case your server is unavailable for a long period of time, it may cause messages to accumulate in our system and lead to delays in message delivery, resulting in data inconsistency.